package com.foreverwin.mes.production.support;

/**
 * @author Ervin Chen
 * @date 2020/2/4 12:34
 */
public enum LoadStrategyFactory {
    //上料模式1：库存编号
    MSR01(new InventoryIdLoadStrategy()),
    //上料模式2：物料+库存批次+数量
    MSR02(new ItemBatchNumberQtyLoadStrategy()),
    //上料模式3：物料+库存批次
    MSR03(new ItemBatchNumberLoadStrategy());

    private LoadStrategy loadStrategy;
    LoadStrategyFactory(LoadStrategy loadStrategy ){
        this.loadStrategy = loadStrategy;
    }

    public static LoadStrategy getLoadStrategy( String loadMode ){
        return valueOf(loadMode).loadStrategy;
    }
}
